Network Slave Node and Time Synchronization Method in Network Applying the Same

ABSTRACT

Provided are a network slave node and a time synchronization method using precision time protocol-like (PTP-like) in a network. The network slave node includes a packet detection unit for detecting whether the slave node receives or sends a synchronization protocol packet and recording a synchronization protocol packet receiving time and a synchronization protocol packet sending time; a hardware clock; and a control unit controlling the packet detection unit and the hardware clock. The control unit reads out the packet receiving time and the packet sending time from the packet detection unit and informs a local master node. The local master node calculates a time offset between the local master node and the slave node, and informs the control unit. The control unit adjusts the hardware clock based on the time offset so that the local master node and the slave node are time synchronized.

This application claims the benefit of Taiwan application Serial No.98144579, filed Dec. 23, 2009, the subject matter of which isincorporated herein by reference.

TECHNICAL FIELD

The disclosure relates to a network slave node and a precision timesynchronization method.

BACKGROUND

In the factory automation control and LXI (LAN eXtension Instrument),the precision time synchronization has to be achieved. In the factoryautomation control (such as the manufacturing apparatus automationcontrol or the robot arm automation control), in which the precisiontime synchronization is emphasized, the highest request on thecommunication time synchronization is the motion control, such as therobot arm control, the motor rotating speed control or the like. Thenode, such as the robot arm or the motor, and the grand master need tobe time synchronized to each other. If the time synchronization is notprecise, the product may fail, and the profit is directly influenced andthe great loss in the money is caused.

The intranet measurement is adapted to the environment, such as thevehicle automation test production line, the airplane electronicapparatus test, the rocket launching base, or the like. Among theseenvironments, computers, machines and sensing members have to be timesynchronized so that the signals returned from the sensing members maybe simultaneously measured at the specific time for subsequent dataanalysis.

The precision time protocol (PTP) may be adopted in the timesynchronization of the network. The PTP specifies the best master clock(BMC) algorithm to determine which one node becomes the unique grandmaster in this network. In this network, all the slave nodes have to betime synchronized with the grand master. The grand master periodically(e.g., every two seconds) requests all slave nodes to be timesynchronization for keeping time synchronization.

At present, in the time synchronization process, the slave node has tosupport the BMC algorithm to determine which is the best clock. Inaddition, in order to satisfy PTP, the slave node must have an operationsystem, a microprocessor, a driving device so as to calculate the timedeviation between the slave node and the master node. In addition, theslave node still needs to consider the packet sending delay time in timeadjustment.

BRIEF SUMMARY

Consistent with the exemplary embodiments of the disclosure, there isprovided a network slave node based on a PTP-like (Precise Time Protocollike), and a time synchronization method thereof. The network slave nodesends a standard packet, which includes a packet receiving time and/or apacket sending time, to a local master node; and the local master nodecalculates a time offset between each network slave node and the localmaster node and sends the time offset to the slave node. The networkslave node receives packets from the local master node to update time byitself.

According to a first exemplary embodiment of the disclosure, a precisiontime synchronization method for a network having a local master node andat least one slave node is provided. The method includes the steps of:outputting a synchronization packet from the local master node to theslave node, and recording, by the local master node, a first time ofoutputting the synchronization packet; recording, by the slave node, asecond time of receiving the synchronization packet when the slave nodereceives the synchronization packet; adding, by the slave node, thesecond time to a sync response packet after receiving thesynchronization packet, and returning, by the slave node, the syncresponse packet to the local master node; extracting, by the localmaster node, the second time from the sync response packet after thelocal master node receives the sync response packet, so that the localmaster node establishes a first time difference equation expressing thata difference between the second time and the first time is equal to atime offset plus a packet transmission delay time; sending, by the slavenode, a slave sync packet to the local master node, and recording, bythe slave node, a third time of outputting the slave sync packet;recording, by the local master node, a fourth time of receiving theslave sync packet after the local master node receives the slave syncpacket; sending, by the slave node, a slave node notification packet tothe local master node, and adding, by the slave node, the third time tothe slave node notification packet; establishing, by the local masternode, a second time difference equation expressing that a differencebetween the fourth time and the third time is equal to the packettransmission delay time minus the time offset, wherein the local masternode calculates the time offset between the local master node and theslave node and the packet transmission delay time according to the firstand second time difference equations; and outputting, by the localmaster node, a clock update packet to the slave node, wherein the clockupdate packet carries the time offset between the local master node andthe slave node and the packet transmission delay time, so that the slavenode is time synchronized with the local master node after the slavenode performs time calibration according to the time offset.

According to a second exemplary embodiment of the disclosure, a slavenode coupled to a local master node in a network is provided. The slavenode includes a packet detection unit, a hardware clock and a controlunit. The packet detection unit detects whether the slave node receivesor sends a synchronization protocol packet and records a synchronizationprotocol packet receiving time and a synchronization protocol packetsending time The control unit is coupled to and controls the packetdetection unit and the hardware clock. The control unit reads out thesynchronization protocol packet receiving time and the synchronizationprotocol packet sending time from the packet detection unit, and informsthe local master node about the synchronization protocol packetreceiving time and the synchronization protocol packet sending time. Thecontrol unit receives (1) a time offset between the local master nodeand the slave node and (2) a packet transmission delay time which areboth calculated by the local master node. The control unit adjusts thehardware clock according to the time offset and the packet transmissiondelay time, so that the slave node and the local master node are timesynchronized.

According to a third exemplary embodiment of the disclosure, a precisiontime synchronization method applied to a slave node connected to a localmaster node is provided. The method includes the steps of: receiving, bythe slave node, a synchronization packet outputted from the local masternode at a first time, and recording, by the slave node, a second time ofreceiving the synchronization packet; returning, by the slave node, async response packet containing the second time to the local master nodeafter receiving the synchronization packet, wherein the local masternode establishes a first time difference equation expressing that adifference between the second time and the first time is equal to a timeoffset plus a packet transmission delay time; sending, by the slavenode, a slave sync packet to the local master node, and recording, bythe slave node, a third time of outputting the slave sync packet,wherein the local master node receives the slave sync packet at a fourthtime; sending, by the slave node, a slave node notification packetcontaining the third time to the local master node, such that the localmaster node establishes a second time difference equation expressingthat a difference between the fourth time and the third time is equal tothe packet transmission delay time minus the time offset, the localmaster node calculates both the time offset between the local masternode and the slave node and the packet transmission delay time accordingto the first and second time difference equations; and receiving, by theslave node, a clock update packet outputted from the local master node,the clock update packet carrying the time offset between the localmaster node and the slave node and the packet transmission delay time,so that the slave node is time synchronized with the local master nodeafter the slave node performs a time calibration according to the timeoffset.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory onlyand are not restrictive of the disclosed embodiments, as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic illustration showing a communication systemaccording to an embodiment of the disclosure.

FIG. 2 is a functional block diagram showing a slave node according tothe embodiment of the disclosure.

FIG. 3 shows the PTP-like according to the embodiment of the disclosurefor achieving precision time synchronization between a local master nodeand the slave node.

FIG. 4A and 4B show a time synchronization method according to theembodiment of the disclosure.

DETAILED DESCRIPTION

FIG. 1 is a schematic illustration showing a communication system 100according to an embodiment of the disclosure. Referring to FIG. 1, thecommunication system (network system) 100 includes a grand master 110and multiple sub-networks 120 and 130. The sub-network 120 includes anetwork connecting apparatus 121 and multiple slave nodes 122. Thesub-network 130 includes a network connecting apparatus 131 and multipleslave nodes 132. In this embodiment, the sub-network is, for example butwithout limitation to, a packet network, such as the Internet Protocol(IP) network or the like. The slave node of this embodiment may beapplied to the slave node 122 and the slave node 132.

Taking the factory automation environment as an example, these twosub-networks may be regarded as the two factory automation areas.

The grand master 110 and the network connecting apparatuses 121 and 131support the best master clock (BMC) algorithm and the precision timeprotocol.

The grand master 110 is always the master node, and the time of thegrand master 110 is the standard time of the communication system 100.All network connecting apparatuses, i.e. 121 and 131, in thecommunication system 100 need to be time synchronized with the grandmaster 110. The grand master 110 periodically (e.g., every two 2seconds) outputs a time synchronization request to the networkconnecting apparatuses 121 and 131, so that the network connectingapparatuses 121 and 131 are time synchronized with the grand master 110.Similarly, the network connecting apparatuses 121 and 131 alsoperiodically output time synchronization requests to all slave nodes(for example 122 and 132), so that all slave nodes are time synchronizedwith the network connecting apparatuses 121/131. Consequently, it ispossible to ensure that all nodes in the communication system 100 aretime synchronized.

Regarding the relationships between the network connecting apparatuses121 and 131 and the grand master 110, the grand master 110 is the masterwhile the network connecting apparatuses 121 and 131 are the slaves.Regarding the relationships between the network connecting apparatus121/131 and the slave node 122/132, the network connecting apparatuses121 and 131 are the masters while the slave node 122/132 is the slave.

In this embodiment, the network connecting apparatuses 121 and 131 maybe, but without limitation to, a gateway, a router, a switch, a bridge,or the like. In this embodiment, the network connecting apparatuses 121and 131 have the functions of dispatching, forwarding and switching thepackets. The network connecting apparatuses 121 and 131 are to beconnected to multiple networks. The communication protocols adopted inthe sub-networks 120 and 130 may be the same as or different from eachother. In the embodiment of the disclosure, all slave nodes support thePTP-like.

FIG. 2 is a functional block diagram showing a slave node 200 accordingto the embodiment of the disclosure. As shown in FIG. 2, the slave node200 (e.g., the slave node 122/132 in FIG. 1) according to the embodimentof the disclosure includes a network physical interface (PHY) 201, anetwork media access control interface (MAC) 202, an application outputunit 203 and a PTP-like executing module 210. The PTP-like executingmodule 210 includes a control unit 211, a packet detection unit 213, ahardware clock 215 and an event trigger unit 217.

Functions and operations of the network physical interface 201 and thenetwork media access control interface 202 are not particularlyrestricted.

A local master node 220 is, for example, the network connectingapparatus 121/131 of FIG. 1.

The application output unit 203 is triggered by the event trigger unit217 in the PTP-like executing module 210 to execute the correspondingoperation. For example, the slave node of this embodiment may becombined/incorporated with wireless/wired sensors. If user sets thesensor to sense data at 12:00 pm, then at 12:00 pm, the event triggerunit 217 triggers the sensor to sense data.

The PTP-like executing module 210 judges whether the packet transmittedfrom the local master node 220 is used for time synchronization, andcorrespondingly sends packets to the local master node 220.

The control unit 211 controls the packet detection unit 213, thehardware clock 215 and the event trigger unit 217. In addition, thecontrol unit 211 is in charge of completing (generating) packets to besent to the local master node 220.

The packet detection unit 213 detects packets received by or output fromthe MAC 202. If this packet relates to the time synchronizationoperation (i.e., the synchronization protocol packet), the packetdetection unit 213 records the time of receiving by or the time oftransmitting this packet from the MAC 202 into, for example, an internalregister. In detail, the packet detection unit 213 is a synchronizationprotocol packet detection unit for detecting whether the slave nodereceives or sends the synchronization protocol packet, and for recordingthe synchronization protocol packet receiving time and thesynchronization protocol packet sending time.

The hardware clock 215 is the clock of the control unit 211. That is,the hardware clock 215 is the clock of the slave node. The hardwareclock 215 is, for example, a 1588 hardware clock. In addition, thehardware clock 215 further has a time access interface 216 for sendingout the time of the slave node.

The event trigger unit 217 can trigger the application output unit 203to perform corresponding operations.

FIG. 3 shows precision time synchronization between the local masternode and the slave node according to the embodiment of the disclosure.As shown in FIG. 3, the parameter O represents the time offset betweenthe local master node M and the slave node S. However, before the localmaster node M and the slave node S send packets to each other, the localmaster node cannot calculate the real value of the time offset O.

At time t0, the local master node M outputs a sync packet 310 to theslave node S to notify the slave node S that starting of the timesynchronization. The local master node M itself records the time t0.When the slave node S receives the synchronization packet 310, thepacket detection unit 213 detects whether the packet sent from the localmaster node M is for the time synchronization operation. If yes, thepacket detection unit 213 records the time (t1) of receiving thesynchronization packet 310 by the slave node S.

After receiving the synchronization packet 310, the slave node S returnsa sync response packet 320 to the local master node M, and the syncresponse packet 320 carries the time t1 of receiving the synchronizationpacket 310 by the slave node S. In detail, before the control unit 211tries to send out the sync response packet 320 through the MAC 202, thecontrol unit 211 reads the packet receiving time t1 from the packetdetection unit 213 and adds the packet receiving time t1 to the syncresponse packet 320.

After the local master node M receives the sync response packet 320, thelocal master node M extracts the time t1 from the sync response packet320. So, the local master node M may calculate the parameter A:

A=O+D=t1−t0   (1)

The parameter A represents the packet transmission delay time from thetime when the local master node M outputs the packet to the time whenthe slave node S receives the packet, from the view point of the slavenode S.

Next, the slave node S sends a slave sync packet 330 to the local masternode M, and the slave node S records the packet sending time t2. Indetail, when the control unit 211 tries to send out the slave syncpacket 330 through the MAC 202, the packet detection unit 213 detectsthat this packet relates to the time synchronization operation, and thepacket detection unit 213 internally records the packet sending time t2.

After the local master node M receives the slave sync packet 330, thelocal master node M records the receiving time t3.

Thereafter, the slave node S sends out a slave node notification packet340 to the local master node M, and this packet carries the time t2 ofsending out the slave sync packet 330 by the slave node. In detail,because the packet detection unit 213 has recorded the time t2, beforethe control unit 211 tries to send out the notification packet 340through the MAC 202, the control unit 211 reads the packet sending timet2 from the packet detection unit 213 and adds the packet sending timet2 to the slave node notification packet 340.

After the local master node M receives the slave node notificationpacket 340, the local master node M can calculate the parameter B basedon the slave node notification packet 340.

B=D−O=t3−t2   (2)

The local master node M can obtain the parameters O and D according toEquations (1) and (2).

O=(A−B)/2   (3)

D=(A+B)/2   (4)

The local master node M can calculate the time offset 0 between thelocal master node M and the slave node S. In addition, the local masternode M can further calculate the packet transmission delay time D, forwhich the local master node M sends the packet to the slave node S,according to Equations (1) to (4).

After the parameters O and D are calculated, the local master node Moutputs a clock update packet 350 to the slave node S to notify how theslave node S adjusts time. The clock update packet 350 at least includesthe parameters D, O and R. The parameter R is the time offsetfluctuation rate representing the fluctuation condition of the parameterO. The slave node S obtains the parameter O (time offset) and theparameter D (packet transmission delay time) from the local master nodeM through the clock update packet 350. The slave node S adjusts the timeof the hardware clock according to the parameter O. In addition, theslave node S further adjusts the time oscillation rate of the hardwareclock according to the parameter R if the hardware clock is a quartzoscillator. In detail, the control unit 211 adjusts the hardware clock215 according to the parameters O and R.

The local master node M calculates the packet transmission delay time D.So, when the hardware clock of the slave node S is adjusted, theprecision of time synchronization cannot be affected by the packettransmission delay factor.

FIG. 4A and 4B show the time synchronization method according to theembodiment of the disclosure. The local master node outputs thesynchronization packet to the slave node, and the local master noderecords the time t0 of outputting the synchronization packet, as shownin step 410.

When the slave node receives the synchronization packet, the slave noderecords the time t1 of receiving the synchronization packet, as shown instep 420.

After receiving the synchronization packet, the slave node adds the timet1 to the sync response packet and returns the sync response packet tothe local master node, as shown in step 430.

After the local master node receives the sync response packet, the localmaster node extracts the time t1, so that the local master nodeestablishes a first time difference equation expressing that adifference between the second time (t1) and the first time (t0) is equalto a time offset parameter plus the packet transmission delay value, asshown in step 440.

The slave node sends the slave sync packet to the local master node, andthe slave node records the time t2 of outputting the slave sync packet,as shown in step 450.

After the local master node receives the slave sync packet, the localmaster node records the time t3 of receiving the slave sync packet, asshown in step 460.

The slave node sends out the slave node notification packet to the localmaster node, and the slave node adds the time t2 to the slave nodenotification packet, as shown in step 470.

After the local master node receives the slave node notification packet,the local master node establishes a second time difference equationexpressing that a difference between the fourth time (t3) and the thirdtime (t2) is equal to the packet transmission delay time minus the timeoffset. The local master node can calculate a time offset between thelocal master node and the slave node and the packet transmission delaytime, for which the local master node sends packets to the slave node,according to the first and second time difference equations, as shown instep 480.

The local master node outputs a clock update packet to the slave node,so that the slave node is time synchronized with the local master nodeafter the slave node adjusts its internal time (i.e., the time of thehardware clock 215) based on the time offset, as shown in step 490. Theclock update packet includes the time offset between the local masternode and the slave node and the packet transmission delay time.

It will be appreciated by those skilled in the art that changes could bemade to the disclosed embodiments described above without departing fromthe broad inventive concept thereof. It is understood, therefore, thatthe disclosed embodiments are not limited to the particular examplesdisclosed, but is intended to cover modifications within the spirit andscope of the disclosed embodiments as defined by the claims that follow.

1. A precision time synchronization method for a network having a localmaster node and at least one slave node, the method comprising steps of:outputting a synchronization packet from the local master node to theslave node, and recording, by the local master node, a first time ofoutputting the synchronization packet; recording, by the slave node, asecond time of receiving the synchronization packet when the slave nodereceives the synchronization packet; adding, by the slave node, thesecond time to a sync response packet after receiving thesynchronization packet, and returning, by the slave node, the syncresponse packet to the local master node; extracting, by the localmaster node, the second time from the sync response packet after thelocal master node receives the sync response packet, so that the localmaster node establishes a first time difference equation expressing thata difference between the second time and the first time is equal to atime offset plus a packet transmission delay time; sending, by the slavenode, a slave sync packet to the local master node, and recording, bythe slave node, a third time of outputting the slave sync packet;recording, by the local master node, a fourth time of receiving theslave sync packet after the local master node receives the slave syncpacket; adding, by the slave node, the third time to a slave nodenotification packet; and sending, by the slave node, the slave nodenotification packet to the local master node; establishing, by the localmaster node, a second time difference equation expressing that adifference between the fourth time and the third time is equal to thepacket transmission delay time minus the time offset, wherein the localmaster node calculates the time offset between the local master node andthe slave node and the packet transmission delay time according to thefirst and second time difference equations; and outputting, by the localmaster node, a clock update packet to the slave node, wherein the clockupdate packet carries the time offset between the local master node andthe slave node and the packet transmission delay time, so that the slavenode is time synchronized with the local master node after the slavenode performs time calibration according to the time offset.
 2. Themethod according to claim 1, wherein the step of recording, by the slavenode, the second time of receiving the synchronization packet comprises:detecting and analyzing, by the slave node, whether the synchronizationpacket is for time synchronization when the slave node receives thesynchronization packet.
 3. The method according to claim 1, wherein thestep of adding, by the slave node, the second time to the sync responsepacket comprises: reading, by the slave node, the second time from aninternal register before the slave node sends out the sync responsepacket, and adding the second time to the sync response packet.
 4. Themethod according to claim 1, wherein the step of sending, by the slavenode, the slave sync packet to the local master node and recording, bythe slave node, the third time of outputting the slave sync packetcomprises: when the slave node tries to send out the slave sync packet,detecting and analyzing, by the slave node, whether the slave syncpacket relates to a time synchronization operation to determine whetherto record the third time.
 5. The method according to claim 1, whereinthe step of sending, by the slave node, the slave node notificationpacket to the local master node and adding, by the slave node, the thirdtime to the slave node notification packet comprises: before the slavenode sends out the slave node notification packet, reading, by the slavenode, the third time from an internal register and adding the third timeto the slave node notification packet.
 6. The method according to claim1, wherein the clock update packet further carries a time offsetfluctuation rate parameter representing a fluctuation condition of thetime offset.
 7. The method according to claim 6, wherein the slave nodeadjusts a time oscillation rate of an internal hardware clock of theslave node according to the time offset fluctuation rate parameter.
 8. Aslave node, coupled to a local master node in a network, the slave nodecomprising: a packet detection unit for detecting whether the slave nodereceives or sends a synchronization protocol packet, and recording asynchronization protocol packet receiving time and a synchronizationprotocol packet sending time; a hardware clock coupled to the packetdetection unit; and a control unit, coupled to and controlling thepacket detection unit and the hardware clock, wherein the control unitreads out the synchronization protocol packet receiving time and thesynchronization protocol packet sending time from the packet detectionunit, and informs the local master node about the synchronizationprotocol packet receiving time and the synchronization protocol packetsending time; wherein the control unit receives a time offset betweenthe local master node and the slave node and a packet transmission delaytime both calculated by the local master node, the control unit adjuststhe hardware clock according to the time offset and the packettransmission delay time, so that the slave node and the local masternode are time synchronized.
 9. The slave node according to claim 8,further comprising: an event trigger unit coupled to the hardware clockand the control unit; and an application output unit, coupled to theevent trigger unit and triggered by the event trigger unit to perform acorresponding operation.
 10. The slave node according to claim 8,wherein: the slave node receives a synchronization packet outputted bythe local master node at a first time, and the local master node recordsthe first time; and the packet detection unit detects and judges whetherthe synchronization packet is for a time synchronization operation whenthe slave node receives the synchronization packet, and the packetdetection unit records a second time at the slave node receives thesynchronization packet if the synchronization packet is for the timesynchronization operation.
 11. The slave node according to claim 10,wherein: the control unit reads out the second time from the packetdetection unit after receiving the synchronization packet, adds thesecond time to a sync response packet, and sends the sync responsepacket to the local master node.
 12. The slave node according to claim11, wherein: the local master node extracts the second time after thelocal master node receives the sync response packet.
 13. The slave nodeaccording to claim 12, wherein: the slave node sends a slave sync packetto the local master node, and the packet detection unit records a thirdtime of sending the slave sync packet; and the local master node recordsa fourth time of receiving the slave sync packet after the local masternode receives the slave sync packet.
 14. The slave node according toclaim 13, wherein: before the slave node sends out a slave nodenotification packet to the local master node, the control unit reads thethird time from the packet detection unit and adds the third time to theslave node notification packet.
 15. The slave node according to claim14, wherein: the local master node accordingly calculates the timeoffset between the local master node and the slave node after the localmaster node receives the slave node notification packet; the localmaster node outputs a clock update packet to the slave node; and thecontrol unit adjusts the hardware clock according to the clock updatepacket.
 16. The slave node according to claim 15, wherein: the clockupdate packet further carries a time offset fluctuation rate parameter,which represents a fluctuation condition of the time offset; and thecontrol unit adjusts a time oscillation rate of the hardware clockaccording to the time offset fluctuation rate parameter.
 17. The slavenode according to claim 8, wherein the hardware clock further provides atime access interface to send time information of the slave node.
 18. Aprecision time synchronization method for a slave node connected to alocal master node, the method comprising the steps of: receiving, by theslave node, a synchronization packet outputted from the local masternode at a first time, and recording, by the slave node, a second time ofreceiving the synchronization packet; returning, by the slave node, async response packet containing the second time to the local master nodeafter receiving the synchronization packet, wherein the local masternode establishes a first time difference equation expressing that adifference between the second time and the first time is equal to a timeoffset plus a packet transmission delay time; sending, by the slavenode, a slave sync packet to the local master node, and recording, bythe slave node, a third time of outputting the slave sync packet,wherein the local master node receives the slave sync packet at a fourthtime; sending, by the slave node, a slave node notification packetcontaining the third time to the local master node, such that the localmaster node establishes a second time difference equation expressingthat a difference between the fourth time and the third time is equal tothe packet transmission delay time minus the time offset, the localmaster node calculates both the time offset between the local masternode and the slave node and the packet transmission delay time accordingto the first and second time difference equations; and receiving, by theslave node, a clock update packet outputted from the local master node,the clock update packet carrying the time offset between the localmaster node and the slave node and the packet transmission delay time,so that the slave node is time synchronized with the local master nodeafter the slave node performs a time calibration according to the timeoffset.
 19. The method according to claim 18, wherein the step ofreceiving, by the slave node, the second time of the synchronizationpacket comprises: detecting and analyzing, by the slave node, whetherthe synchronization packet is for time synchronization when the slavenode receives the synchronization packet.
 20. The method according toclaim 18, wherein the step of returning, by the slave node, the syncresponse packet containing the second time to the local master nodecomprises: reading, by the slave node, the second time from an internalregister before the slave node sends out the sync response packet, andadding the second time to the sync response packet.
 21. The methodaccording to claim 18, wherein the step of sending, by the slave node,the slave sync packet to the local master node and recording, by theslave node, the third time of outputting the slave sync packetcomprises: detecting and analyzing, by the slave node, whether the slavesync packet relates to a time synchronization operation when the slavenode tries to send out the slave sync packet so as to determine whetherto record the third time.
 22. The method according to claim 18, whereinthe step of sending, by the slave node, the slave node notificationpacket containing the third time to the local master node comprises:reading, by the slave node, the third time from an internal register andadding the third time to the slave node notification packet before theslave node sends out the slave node notification packet.
 23. The methodaccording to claim 18, wherein the clock update packet further carries atime offset fluctuation rate parameter representing a fluctuationcondition of the time offset.
 24. The method according to claim 23,wherein the slave node adjusts a time oscillation rate of an internalhardware clock of the slave node according to the time offsetfluctuation rate parameter.